using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace WozLib.WozCommands
{
  public class RedoWozCommand : WozCommand
  {
    [XmlElement("WozServerCommand")]
    public WozCommand WozServerCommand
    {
      get
      {
        return _WozServerCommand;
      }
      set
      {
        _WozServerCommand = value;
      }
    } WozCommand _WozServerCommand;

    public RedoWozCommand()
    {
    }

    public RedoWozCommand(WozCommand wozServerCommand)
    {
      WozServerCommand = wozServerCommand;
    }

    public override void Undo()
    {
      if (WozServerCommand != null)
      {
        WozServerCommand.Undo();
      }
    }

    public override void Redo()
    {
      if (WozServerCommand != null)
      {
        WozServerCommand.Redo();
      }
    }
  }
}
